//package com.zs.infrastructure.util.basic;
//
//import com.alibaba.fastjson.JSON;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.http.HttpEntity;
//import org.springframework.http.HttpHeaders;
//import org.springframework.http.HttpMethod;
//import org.springframework.http.MediaType;
//import org.springframework.stereotype.Component;
//import org.springframework.util.MultiValueMap;
//import org.springframework.web.client.RestTemplate;
//
//import java.util.HashMap;
//import java.util.Map;
//
///**
// * @description: http工具类
// * @author: wzc
// * @createDate: 2022/2/7 21:12
// */
//@Slf4j
//@Component
//public class ZsRestTemplateUtil {
//
//    String url = "http://api.tushare.pro";
//
//    @Autowired
//    private RestTemplate restTemplate;
//
//    /**
//     * POST请求发送
//     * @param zsHttpRequest
//     * @return
//     */
//    public ZsHttpReponse sendPost(ZsHttpRequest zsHttpRequest) {
//        HttpHeaders headers = new HttpHeaders();
//        headers.setContentType(MediaType.APPLICATION_JSON);
//
//        Map<String, Object> map = new HashMap<>();
//        map.put("api_name","new_share");
//        map.put("token","432e54108661d428e7d35021a2253c0b3b3234d98731e4f09f3a6b5a");
////        map.put("params",null);
//        map.put("fields","");
//        //将请求头部和参数合成一个请求
//        HttpEntity<Map<String, Object>> requestEntity = new HttpEntity<>(map, headers);
//
//        //执行HTTP请求，将返回的结构使用ResultVO类格式化
////        ZsHttpReponse response = restTemplate.postForObject(url, requestEntity, ZsHttpReponse.class);
//        ZsHttpReponse response = null;
//        log.info("请求出参:{}", JSON.toJSONString(response));
//        return response;
//    }
//
//
//}
